<?php

$id = $_REQUEST['id'];

$word = new Word();
$wordResult = $word->findWordID($id);
if (isset($id)) {
    echo "<div id=\"image\">
        <img src=\"".elgg_get_site_url() ."mod/MyCourse/". $wordResult->picture . "\" alt=\"anh tu vung\"/>
    </div> <!-- end image -->

    <div id=\"contentImage\">

<p><b>-" . $wordResult->engName . "</b>
    
    <audio id=\"myaudio\" >
    <source src=\"".elgg_get_site_url() ."mod/MyCourse/". $wordResult->audio."\" type=\"audio/ogg\" />
    <source src=\"".elgg_get_site_url() ."mod/MyCourse/". $wordResult->audio."\"type=\"audio/mp3\" />
      HTML5 audio not supported
    </audio>
    <img id=\"play\" onclick=\"playAudio();\"  
    src=\"".elgg_get_site_url() ."mod/MyCourse/Resources/Tool/Play.jpg\" style=\"width:25px;height:25px;float:right;\"  alt=\"anh tu vung\"/>

</p>
        <p><b>-> " . $wordResult->vietName . "</b></p>
        <p><b>- " . $wordResult->engEx . "</b>
   
    <audio id=\"myaudioex\" >
    <source src=\"".elgg_get_site_url() ."mod/MyCourse/". $wordResult->audioEx."\" type=\"audio/ogg\" />
    <source src=\"".elgg_get_site_url() ."mod/MyCourse/". $wordResult->audioEx."\"type=\"audio/mp3\" />
      HTML5 audio not supported
    </audio>
    <img id=\"play\" onclick=\"playAudioEx();\"  
    src=\"".elgg_get_site_url() ."mod/MyCourse/Resources/Tool/Play.jpg\" style=\"width:25px;height:25px;float:right;\"  alt=\"anh tu vung\"/>
            

</p>
        <p><b>->" . $wordResult->vietEx . "</b></p>
        </div> <!-- end contentImage -->
";
} else {
    echo "Thôi rồi Lượm ơi";
}
/*
require("db.inc");

$response = "<table border='1'>";
$checkbox_all = "<input type='checkbox' name='chkAll' onclick='checkAll();'/>";
$response = $response . "<tr>
							<th>$checkbox_all</th>
							<th>MANV</th>
							<th>Họ tên</th>
							<th>Ngày sinh</th>
							<th>Địa chỉ</th>
							<th>Phái</th>
							<th>Lương</th>
							<th>Phòng</th> 
							<th></th>
						   </tr>";

$strSQL = "SELECT * FROM NhanVien Where HoTen LIKE '%$q%'";

$result = mysql_query($strSQL, $connection);

while ($row = mysql_fetch_array($result)) {

    $manv = $row["MaNV"];
    $hoten = $row["HoTen"];
    $ngaysinh = $row["NgaySinh"];
    $diachi = $row["DiaChi"];
    $phai = $row["Phai"];
    $luong = $row["Luong"];
    $phong = $row["Phong"];

    $checkbox_area = "<input type='checkbox' name='chkItem' value='$manv' onclick='updateList();'/>";

    $delete_button = "<form action='DSNV.php' method='get'>
							<input type='hidden' value='$manv' name='manv'/>
							<input type='submit' value='Delete' name='Delete'/>
							
						  </form>";
    $response = $response . "<tr>
							<td>$checkbox_area</td>
							<td>$manv</td>
							<td>$hoten</td>
							<td>$ngaysinh</td>
							<td>$diachi</td>
							<td>$phai</td>
							<td>$luong</td>
							<td>$phong</td>
							<td>$delete_button<td>
						   </tr>";
}

$response = $response . "</table>";
echo $response;
 
 */